<a href="admin/admin_user/admin_users.php" class="action_back">Back to admin users list</a><br /><br />
<script type="text/javascript">
// ********************* Grid admin_user_log START
var _tm = '{$_tm}';
var _transit_vars_par = ''{foreach from=$_transit_vars item=tvar_value key=tvar_key} + '&' + '{$tvar_key}={$tvar_value}'{/foreach};
var user_id = {$user_id};
{literal}
function submit_ajax_grid_admin_user_log(page) {
	var pars = 'admin_user_log_grid_page=' + page + '&' +  'user=' + user_id + '&' + '_tm=' + _tm + _transit_vars_par;

	fade_out_div();
	var myAjax = new Ajax.Request(
                                    "ajax/modules/admin_panel/grids/admin_user_log_grid.php",
                                    {
                                                method: 'get',
                                                onComplete: admin_user_log_result,
                                                onSuccess: admin_user_log_on_success,
                                                onFailure: admin_user_log_on_failure,
												parameters: pars
                                    }          );
}


function admin_user_log_result(req, json) {
	if (json) {
		var old_tm = _tm;
		_tm = json._tm;

		// refreshing _tm on all links that are outside of updated area
		for (var i=0; i < document.links.length; i++) {
 		  	document.links[i].href = document.links[i].href.replace(old_tm, _tm);
		}


		if (json.result_code == 1) { // OK
				switch(json.command) {
					case 'redirect':
						window.location = json.command_value;
						break;
					case 'show' :
					default :
						grid_div = $('admin_user_log_grid_div');
						grid_div.innerHTML = req.responseText;
						break;
				}
		} else {
				// something is wrong
				if (_site_mode == 0) {
					//if in development mode - show the output anyway (if any).
					grid_div = $('admin_user_log_grid_div');
					grid_div.innerHTML = req.responseText;
				}
		}
	} else {
		// no result_code, some serious error/exception occured.
		if (_site_mode == 1) {
			window.location = _server_error_page;
		} else {
			//if in development mode - show the output anyway (if any).
			grid_div = $('admin_user_log_grid_div');
			grid_div.innerHTML = req.responseText;
		}
	}
}


function fade_out_div() {
	var overlay = $('admin_user_log_overlay');
	var grid_div = $('admin_user_log_grid_div');

	Position.clone(grid_div, overlay)
	var image = $('admin_user_log_waiting');

	overlay.style.display = 'block';
	var image_top_offset = Math.round((overlay.offsetHeight - image.height) / 2);
	image.style.marginTop = image_top_offset + 'px';
}


function fade_in_div() {
	var overlay = $('admin_user_log_overlay');
	overlay.style.display = 'none';
}


function admin_user_log_on_success() {
	fade_in_div();
}


function admin_user_log_on_failure() {
	fade_in_div();
}


function admin_user_log_page_change(page) {
	submit_ajax_grid_admin_user_log(page);
}


{/literal}
// ********************* Grid admin_user_log END
</script>

<div id="admin_user_log_grid_div" style="width:800px;">
{include file="modules/admin_panel/grids/admin_user_log_grid.tpl"}
<div class="metallic_ajax_overlay_grid" id="admin_user_log_overlay" style="display:none; position: absolute; z-index: 90;" align="center"><img src="img/modules/grid_html_tpl_static_ajax_metallic/indicator_medium.gif" onclick="return true;" id="admin_user_log_waiting" alt="" /></div>